﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using bdtheque.data.enums;

namespace bdtheque.data.poco
{
    public class User : Person
    {
        public string Address1 { get; set; }
        public string Address2 { get; set; }
        public string PostalCode { get; set; }
        public string Region { get; set; }
        public string City { get; set; }
        public string Country { get; set; }
        public string Telephone { get; set; }
        public string Email { get; set; }
        public bool IsActive { get; set; }
        // Enum workaround for EF 4.2 limitations
        public UserRole Role 
        { 
            get
            {
                return (UserRole)RoleId;
            } 
            set
            {
                RoleId = (int)value;
            }
        }
        public int RoleId { get; set; }
        public virtual Profile Profile { get; set; }
        public virtual UserCollection UserCollection { get; set; }
    }
}
